package edu.zzu.servideImpl;

import edu.zzu.dao.RegionDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @author: GaoPeng
 * @date: 2021/4/21 15:49
 */
@RestController
public class RegionService implements edu.zzu.service.RegionService {

    @Autowired
    private RegionDao regionDao;

    @Override
    public String getRegionNameByRegionCode(String regionCode) {
        return regionDao.getRegionNameById(regionCode);
    }

    @Override
    public String getRegionCodeByPrv(String prv) {
        return regionDao.getIdByPrv(prv);
    }

    @Override
    public String getRegionCodeByCty(String cty) {
        return regionDao.getIdByCty(cty);
    }

    @Override
    public String getRegionCodeByTwn(String twn) {
        return regionDao.getIdByTwn(twn);
    }
}
